<?php
session_start();

include_once './c/config.php';
include 'jssdk.php';
$jssdk = new JSSDK($appId, $secret);
$signPackage = @$jssdk->GetSignPackage();

$cdnUrl='./';
if (isset($_GET['op'])){
    $_SESSION['openid']=$_GET['op'];
}
$openid='';
if (isset($_SESSION['openid'])){
    $openid=$_SESSION['openid'];
}
if (empty($openid)){
    exit;
}
?><!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>年年有鱼 鼠你有福</title>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<style>
html,body{width:100%;font-size:12px;font-family:Helvetica,Tahoma, Arial, STXihei,Microsoft YaHei, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;}
body{background:#e63d2b;-webkit-overflow-scrolling: touch;overflow-scrolling: touch;overflow-y: scroll;}
body, div{padding:0px;margin:0px auto;max-width:750px;}
.weui-dialog{position:fixed;z-index:5000;width:80%;max-width:600px;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background-color:#FFF;text-align:center;border-radius:3px;overflow:hidden}.weui-dialog__hd{padding:1.3em 1.6em .5em}.weui-dialog__title{font-weight:400;font-size:36px}.weui-dialog__bd{padding:0 1.6em .8em;min-height:80px;font-size:30px;line-height:1.3;word-wrap:break-word;word-break:break-all;color:#999}.weui-dialog__bd:first-child{padding:1.2em 20px .1em;color:#353535}.weui-dialog__ft{position:relative;line-height:96px;font-size:36px;display:-webkit-box;display:-webkit-flex;display:flex}.weui-dialog__ft:after{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1px solid #D5D5D6;color:#D5D5D6;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.weui-dialog__btn{display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;color:#3CC51F;text-decoration:none;-webkit-tap-highlight-color:transparent;position:relative}.weui-dialog__btn:active{background-color:#EEE}.weui-dialog__btn:after{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1px solid #D5D5D6;color:#D5D5D6;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:scaleX(.5);transform:scaleX(.5)}.weui-dialog__btn:first-child:after{display:none}.weui-dialog__btn_default{color:#353535}.weui-dialog__btn_primary{color:#0BB20C}@media screen and (min-width:1024px){.weui-dialog{width:35%}}.weui-mask{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0;background:rgba(0,0,0,.6)}
.weui-mask_transparent{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0}
.js_dialog{display:none;}
-webkit-touch-callout:none;
-webkit-user-select:none;
html{-ms-touch-action:none;}
div,img{-webkit-tap-highlight-color:rgba(0,0,0,0);}
*{-webkit-text-size-adjust: none;}
.simg{position:absolute;display:block;}
a{text-decoration:none;}
.txt{position:absolute;text-indent:4px;color:#787c7f;font-size:12px;z-index:2;border:none;background:transparent;}
.txt::-webkit-input-placeholder{text-align:left;color:#a2a2a2;}
select{position:absolute;color:#787c7f;display:block;background:transparent;border:0px;text-indent:4px;font-size:12px;-webkit-appearance:none;}
.container{position:relative;width:100%;height:auto;}
.tang, .loading, .p1{position:absolute;width:100%;height:100%;display:none;}
.hide, .page{display:none;}
.p1-bgt, .p1-bgb{position:absolute;width:100%;height:50%;left:0;}
.p1-bgt{background:#fb2630;top:0;}
.p1-bgb{background:#05a3ad;bottom:0;}
.g1-t1, .g1-t2, .upost-t2, .share-t1{position:absolute;width:100%;left:0;display:block;}
.g1-t1, .upost-t2, .share-t1{top:0;}
.g1-t2{bottom:0;}
.upost-d, .upost-t1, .upost-save{position:absolute;width:100%;left:0;bottom:0;}
::-webkit-scrollbar{display:none;}
.upost-save{opacity:0;}
.l-b, .thebg, .p-b, .page{position:absolute;width:100%;height:100%;top:0;left:0;}
.fishRun{z-index:3;width:238px;height:386px;position:absolute;transform-origin: center;-webkit-transform-origin: center;display:none;} 
.fish{width:238px;height:386px;position:absolute;top:0;left:0;background:url(./img/y/u.png?v=9) no-repeat left top;background-size:auto 100%;
animation:active 0.7s steps(4) infinite ;}
@keyframes active {0%{}100%{background-position:  -952px top;}} 
.l-t1x{position:absolute;background:transparent url('<?php echo $cdnUrl; ?>img/l-t1-2.png') no-repeat;background-size:cover;}
@-webkit-keyframes rotate{from{-webkit-transform: rotate(0deg)}to{-webkit-transform: rotate(360deg)}}
@keyframes rotate{from{transform: rotate(0deg)}to{transform: rotate(359deg)}}
.l-bar{-webkit-transition-property: -webkit-transform;-webkit-transition-duration: 1s;-moz-transition-property: -moz-transform;-moz-transition-duration: 1s;-webkit-animation: rotate 3s linear infinite;-moz-animation: rotate 3s linear infinite;-o-animation: rotate 3s linear infinite;animation: rotate 3s linear infinite;}
.t-bg{position:absolute;display:none;width:100%;height:100%;top:0px;left:0px;background-color:#000;opacity:.86;z-index:6;}
.rule, .loading, .g1, .end, .usj, .utian, .zhuli, .share, .jpin{z-index:9;display:none;}
.usj-tu, .usj-t1, .utian-tu{position:absolute;width:100%;left:0px;}
.rule-t1{position:absolute;background:transparent url('<?php echo $cdnUrl; ?>img/rule-t1.png') no-repeat;background-size:cover;}
.jpin-t1{position:absolute;background:transparent url('<?php echo $cdnUrl; ?>img/jpin-t1.png') no-repeat;background-size:cover;}
.end-t1{position:absolute;background:transparent url('<?php echo $cdnUrl; ?>img/end-t1.png') no-repeat;background-size:cover;}
.g1-t3{position:absolute;background:transparent url('<?php echo $cdnUrl; ?>img/g1-t3.png') no-repeat;background-size:cover;}
.zhuli-t3{position:absolute;background:transparent url('<?php echo $cdnUrl; ?>img/zhuli.png') no-repeat;background-size:cover;}
.g1-time{position:absolute;width:100%;left:0;top:4.4%;font-weight:600;}
.time-day, .time-hour, .time-sec{position:absolute;z-index:3;color:#fff;font-size:12px;text-align:center;background:transparent url('<?php echo $cdnUrl; ?>img/time-t4.png') no-repeat;background-size:cover;}
.time-d, .jpin-ling{position:absolute;}
.end-txt{position:absolute;text-align:right;color:#fff;font-size:132px;font-weight:700;}
.upost{background:#fb2630;}
.jpin-jilu{position:absolute;width:100%;}
.jpin-j4{position:relative;width:100%;}
.jpin-t4{position:absolute;left:0;}
.jpin-time{position:absolute;font-size:12px;}
</style>
</head><body>
<div class="container">
    <div class="loading">
    	<img class="l-b" src="<?php echo $cdnUrl; ?>img/l.jpg">
    	<div class="thebg">
        	<img class="p-b" src="<?php echo $cdnUrl; ?>img/l-b.png">
        	<img class="l-t1 simg" src="<?php echo $cdnUrl; ?>img/l-t1.png">
        	<div class="l-t1x"></div>
        	<img class="l-bar simg" src="<?php echo $cdnUrl; ?>img/l-bar.png">
        	<img class="l-t2 simg" src="<?php echo $cdnUrl; ?>img/l-t2.png?v=2">
    	</div>
    </div>
    <div class="p1">
       <div class="p1-bgt"></div>
       <div class="p1-bgb"></div>
       <div class="thebg">
           <img class="p-b" src="<?php echo $cdnUrl; ?>img/3.jpg">
           <img class="p1-b1 simg" src="<?php echo $cdnUrl; ?>img/p1-b1.png">
           <div class="p1-hdgz simg"></div>
           <div class="p1-jpzc simg"></div>
       </div>
    </div>
    
    <div class="t-bg"></div>
    <div class="g1 page">
        <img class="g1-t1" src="<?php echo $cdnUrl; ?>img/g1-t1.png">
        <img class="g1-t2" src="<?php echo $cdnUrl; ?>img/g1-t2.png">
        <div class="g1-t3">
           <div class="g1-start simg"></div>
        </div>
    </div>
    
    <div class="zhuli page">
        <img class="g1-t1" src="<?php echo $cdnUrl; ?>img/g1-t1.png">
        <img class="g1-t2" src="<?php echo $cdnUrl; ?>img/g1-t2.png">
        <div class="zhuli-t3">
           <div class="zhuli-close simg"></div>
           <div class="zhuli-qing simg"></div>
        </div>
    </div>
    <div class="share page">
        <img class="share-t1" src="<?php echo $cdnUrl; ?>img/share-t1.png">
    </div>
    
    <div class="usj page">
        <img class="g1-t1" src="<?php echo $cdnUrl; ?>img/g1-t1.png">
        <img class="g1-t2" src="<?php echo $cdnUrl; ?>img/g1-t2.png">
        <img class="usj-tu" src="<?php echo $cdnUrl; ?>img/j/xy.png">
        <div class="usj-t1">
            <div class="usj-open simg"></div>
        </div>
    </div>
    <div class="utian page">
        <img class="g1-t1" src="<?php echo $cdnUrl; ?>img/g1-t1.png">
        <img class="g1-t2" src="<?php echo $cdnUrl; ?>img/g1-t2.png">
        <img class="utian-tu" src="<?php echo $cdnUrl; ?>img/j/ddutian.png">
        <div class="usj-t1">
             <input id="u-name" class="txt" name="name" type="text" />
	     	 <input id="u-lx" class="txt" name="lx" type="text" />
	     	 <input id="u-sf" class="txt" name="sf" type="text" />
	     	 <div class="u-tj simg"></div>
        </div>
    </div>
    <div class="upost page">
        <img class="upost-d" src="<?php echo $cdnUrl; ?>img/j/fq-post-bg.jpg">
        <div class="thebg">
        <img class="upost-t2" src="<?php echo $cdnUrl; ?>img/j/fq-t2.png">
        </div>
 
        <img class="upost-save" src="<?php echo $cdnUrl; ?>img/j/fq-post.jpg">
    
    </div>
    
    <div class="end page">
         <img class="g1-t1" src="<?php echo $cdnUrl; ?>img/g1-t1.png">
         <img class="g1-t2" src="<?php echo $cdnUrl; ?>img/g1-t2.png">
         <div class="end-t1">
            <div class="end-txt">0</div>
            <div class="end-cha simg"></div>
         </div>
    </div>
    
    <div class="rule page">
        <div class="rule-t1">
          <div class="rule-close simg"></div>
        </div>
    </div>
    
    <div class="jpin page">
        <div class="jpin-t1">
          <div class="jpin-jilu">
            <div class="jpin-j4">
               <img class="jpin-t4" src="<?php echo $cdnUrl; ?>img/t/4.png">
               <div class="jpin-time">2020-1-3 09:12:12</div>
               <img class="jpin-ling" src="<?php echo $cdnUrl; ?>img/t/yi.png">
               
            </div> 
          
          
          </div>
          <div class="jpin-close simg"></div>
        </div>
    </div>
    
	<div class="tang">
	    
	    <img class="l-b" src="./img/tang.jpg">
	    <img class="l-b"   src="./img/h/di.png">
	    <div class="fishRun fishRun0" id="fishRun0" num =0><div class="fish"></div></div>
    	<div class="fishRun fishRun1" id="fishRun1" num =1><div class="fish"></div></div>
    	<div class="fishRun fishRun2" id="fishRun2" num =2><div class="fish"></div></div>
    	<div class="fishRun fishRun3" id="fishRun3" num =3><div class="fish"></div></div>
    	<div class="fishRun fishRun4" id="fishRun4" num =4><div class="fish"></div></div>
    	<div class="fishRun fishRun5" id="fishRun5" num =5><div class="fish"></div></div>
    	<div class="fishRun fishRun6" id="fishRun6" num =6><div class="fish"></div></div>
    	<div class="fishRun fishRun7" id="fishRun7" num =7><div class="fish"></div></div>
    	<div class="fishRun fishRun8" id="fishRun8" num =8><div class="fish"></div></div>
    	<div class="fishRun fishRun9" id="fishRun9" num =9><div class="fish"></div></div>
    	<div class="fishRun fishRun10" id="fishRun10" num =10><div class="fish"></div></div>
    	<div class="fishRun fishRun11" id="fishRun11" num =11><div class="fish"></div></div>
    	<div class="fishRun fishRun12" id="fishRun12" num =12><div class="fish"></div></div>
    	<div class="fishRun fishRun13" id="fishRun13" num =13><div class="fish"></div></div>
    	<div class="fishRun fishRun14" id="fishRun14" num =14><div class="fish"></div></div>
    	<div class="fishRun fishRun15" id="fishRun15" num =15><div class="fish"></div></div>
        <img class="tang-h1 simg" src="./img/h/1.png">
	    <img class="tang-h2 simg" src="./img/h/2.png">  
	    <img class="tang-h3 simg" src="./img/h/3.png"> 
	    <img class="tang-h4 simg" src="./img/h/4.png">   
	    <img class="tang-h5 simg" src="./img/h/5.png">
	    <img class="tang-h6 simg" src="./img/h/6.png">
	    <img class="tang-h7 simg" src="./img/h/7.png">
	    <img class="tang-h8 simg" src="./img/h/8.png">  
	    
	    <div class="g1-time">
           <img class="time-d1 time-d" src="<?php echo $cdnUrl; ?>img/time-d.png">
           <img class="time-d2 time-d" src="<?php echo $cdnUrl; ?>img/time-d.png">
           <div class="time-day">00</div>
           <div class="time-hour">00</div>
           <div class="time-sec">10</div>
        </div>
	       
    </div>
    
    <div class="js_dialog">
       <div class="weui-mask"></div>
       <div class="weui-dialog">
                <div class="weui-dialog__bd weui-msg"></div>
                <div class="weui-dialog__ft">
                    <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary weui-btn">知道了</a>
                </div>
        </div>
     </div>
     
</div>
<div style="display:none;">
    <audio id="cm3" preload="auto"><source src="./js/c.mp3"  type="audio/mpeg"></audio>
    <audio id="dm3" preload="auto"><source src="./js/dao.mp3"  type="audio/mpeg"></audio>
    <audio id="mbg" preload="auto" loop="loop"><source src="./js/m.mp3"  type="audio/mpeg"></audio>
</div>
<script src="http://mat1.gtimg.com/libs/jquery2/2.1.4/jquery2.min.js"></script>
<script src="<?php echo $cdnUrl ?>js/TweenMax.min.js?v=2"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<script>
_h=h= Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
var sWidth = parseInt((window.innerWidth > 0) ? window.innerWidth : screen.width);
if(sWidth>750){sWidth=750;}
var _rate=(sWidth/750);
if(h<_rate*1206){h=_rate*1206;}
var _loadW=_rate*490;
var _loadW2=_rate*480;
var _loadBL=_rate*106;
var _loadI=0;
var _jId=4;
var _mbg=document.getElementById("mbg");
var _dm3=document.getElementById("dm3");
var _cm3=document.getElementById("cm3");
function _loading(){
	_loadI=_loadI+0.04;
	if(_loadI > 1){
		$(".loading, .p1").fadeOut(1400);
		$(".tang").show();
	 _loadI=1;}
	$('.l-bar').css({"left":_loadBL+_loadW2*_loadI});
	$('.l-t1x').width(_loadW*_loadI);
	if(_loadI > .99){return;}
	window.setTimeout(function(){_loading();}, 60);
}
_loading();
var _img=['m.png'];
var loader = new PxLoader();
for(var i=0; i<_img.length; i++){loader.addImage('./img/'+_img[i]);}
loader.start();
$(".loading").show();
$(function(){
	  $('.container').width(sWidth).height(h);
	  $('.thebg, .p-b, .upost-d, .upost-save').height(_rate*1206);
	  $('.p1-b1').width(_rate*326).height(_rate*96).css({"top":_rate*1038, "left":_rate*212});
	  $('.rule-close').width(_rate*200).height(_rate*130).css({"top":_rate*800, "left":_rate*284});
	  $('.jpin-close').width(_rate*200).height(_rate*130).css({"top":_rate*880, "left":_rate*284});
	  $('.jpin-jilu').height(_rate*440).css({"top":_rate*436, "left":0});

	  $('.jpin-j4').height(_rate*113);
	  $('.jpin-t4').width(_rate*658).height(_rate*113).css({"top":0, "left":0});
	  $('.jpin-time').css({"top":_rate*78, "left":_rate*122});
	  $('.jpin-ling').width(_rate*150).height(_rate*60);
	  $('.jpin-j4 .jpin-ling').css({"top":_rate*24, "left":_rate*480});
	  

	  $('.l-t1').width(_rate*628).height(_rate*54).css({"top":_rate*984, "left":0});
	  $('.l-t1x').width(0).height(_rate*54).css({"top":_rate*984, "left":_rate*140});
	  $('.l-bar').width(_rate*53).height(_rate*53).css({"top":_rate*984, "left":_rate*126});
	  $('.l-t2').width(_rate*428).height(_rate*47).css({"top":_rate*1072, "left":_rate*182});
	  $('.p1-hdgz').width(_rate*100).height(_rate*155).css({"top":_rate*170, "right":0});
	  $('.p1-jpzc').width(_rate*100).height(_rate*155).css({"top":_rate*344, "right":0});

	  
      var _tmpH=(h - _rate*910)/2;
	  $('.rule-t1').width(sWidth).height(_rate*910).css({"top":_tmpH, "left":0});


	  var _tmpH=(h - _rate*978)/2;
	  $('.jpin-t1').width(sWidth).height(_rate*978).css({"top":_tmpH, "left":0});
	  
	  var _tmpH=(h - _rate*698)/2;
	  $('.end-t1').width(sWidth).height(_rate*698).css({"top":_tmpH, "left":0});
	  var _tmpH=(h - _rate*970)/2;
	  $('.usj-tu, .usj-t1, .utian-tu').height(_rate*949).css({"top":_tmpH});
	  $('.usj-open').width(_rate*445).height(_rate*185).css({"top":_rate*680, "left":_rate*165});
	  $('.end-cha').width(_rate*350).height(_rate*120).css({"top":_rate*428, "left":_rate*202});
	  $('.end-txt').width(_rate*310).height(_rate*160).css({"top":_rate*188, "left":_rate*152,'line-height':_rate*160+'px'});
	  $('.upost-t1').height(_rate*665);
	  if(h > _rate*1206){
		   var _cha= (h - _rate*1260)/2;
		   if(_cha > 0){
		      $('.thebg').css({"top":_cha});
		   }
	  }
 
	  var _tmpH=(h - _rate*646)/2;
	  $('.g1-t3').width(sWidth).height(_rate*646).css({"top":_tmpH, "left":0});
	  $('.g1-start').width(_rate*350).height(_rate*120).css({"top":_rate*510, "left":_rate*200});
	  $('.time-day').width(_rate*69).height(_rate*65).css({"top":0, "left":_rate*246,'line-height':_rate*65+'px'});
	  $('.time-hour').width(_rate*69).height(_rate*65).css({"top":0, "left":_rate*340,'line-height':_rate*65+'px'});
	  $('.time-sec').width(_rate*69).height(_rate*65).css({"top":0, "left":_rate*438,'line-height':_rate*65+'px'});
	  $('.time-d').width(_rate*33).height(_rate*47);
	  $('.time-d1').css({"top":_rate*20, "left":_rate*312});
	  $('.time-d2').css({"top":_rate*20, "left":_rate*408});
	  $('.tang-h1').width(_rate*208).height(_rate*163).css({"top":0, "left":0});
	  $('.tang-h2').width(_rate*240).height(_rate*278).css({"top":_rate*163, "left":0});
	  $('.tang-h3').width(_rate*265).height(_rate*182).css({"top":0, "left":_rate*250});
	  $('.tang-h4').width(_rate*80).height(_rate*169).css({"top":_rate*290, "left":_rate*670});
	  $('.tang-h5').width(_rate*231).height(_rate*233).css({"top":_rate*576, "left":_rate*310});
	  $('.tang-h6').width(_rate*130).height(_rate*180).css({"bottom":0, "left":0});
	  $('.tang-h7').width(_rate*134).height(_rate*332).css({"bottom":0, "right":0});
	  $('.tang-h8').width(_rate*137).height(_rate*166).css({"bottom":0, "left":_rate*478})
	  
	  
	  $('#u-name').width(_rate*290).height(_rate*52).css({"top":_rate*330, "left":_rate*298});
	  $('#u-lx').width(_rate*290).height(_rate*52).css({"top":_rate*406, "left":_rate*298});
	  $('#u-sf').width(_rate*290).height(_rate*52).css({"top":_rate*476, "left":_rate*298});
	  $('.u-tj').width(_rate*350).height(_rate*160).css({"top":_rate*720, "left":_rate*198});
	  var _tmpH=(h - _rate*542)/2;
	  $('.zhuli-t3').width(_rate*750).height(_rate*542).css({"top":_tmpH, "left":0});
	  $('.zhuli-close').width(_rate*100).height(_rate*120).css({"top":0, "left":_rate*570});
	  $('.zhuli-qing').width(_rate*370).height(_rate*120).css({"top":_rate*260, "left":_rate*190});
	  
	  
	  var ww = $(window).width();
	  var hh = $(window).height();
	  var fishW = 238;
	  var fishH = 386;


	  var n=20;
	  var pos=[
	  	{startX:ww*.7 , startY:-fishW , endX:-fishW , endY:hh, angle:200 , time:6},
	  	{startX:-fishW , startY:-fishH*.5 , endX:ww*1.1, endY:hh, angle:146, time:6},
	  	{startX:-fishW , startY:fishH*.2 , endX:ww*1.1, endY:hh*.5, angle:120, time:6},
	  	{startX:-126 , startY:hh*0.7 , endX:ww*1.1 , endY:hh*0.2, angle:45, time:8},
	  	{startX:-126 , startY:hh , endX:ww*1.1 , endY:hh*0.2, angle:40, time:8},
	  	{startX:ww , startY:hh*0.1 , endX:-fishW , endY:hh*0.8, angle:-125, time:8},
	  	{startX:ww*1.1 , startY:hh*1.1 , endX:-fishH , endY:-hh, angle:-30, time:8},
	  	{startX:-126 , startY:hh*.7 , endX:ww , endY:hh*0.2, angle:50, time:8},
	  	{startX:ww , startY:hh , endX:-fishW , endY:0, angle:-45, time:8},
	  	{startX:ww, startY: hh*0.6, endX:-ww, endY:hh*0.4, angle:-65, time:9},
	  	{startX:ww*0.6 , startY:-fishH , endX:ww*0.2, endY:hh, angle:210, time:9},
	  	{startX:ww*0.4 , startY:hh , endX:ww*0.7, endY:-fishH, angle:30, time:9},
	  	{startX:ww, startY:hh*0.1, endX:-126, endY:hh*0.5, angle:-125, time:9},
	  	{startX:ww*0.8 , startY:hh , endX:ww*0.1, endY:-fishH, angle:-30, time:9},
	  	{startX:ww*0.1 , startY:-fishH , endX:ww*0.6 , endY:hh, angle:160, time:9},
	  	{startX:-126 , startY:hh*0.6 , endX:ww , endY:hh*0.1, angle:75, time:9},
	  	{startX:ww , startY:hh , endX:ww*0.1, endY:-fishH, angle:-30, time:9},
	  	{startX:ww , startY:-fishH , endX:ww*0.1, endY:hh, angle:-135, time:10},
	  	{startX:-126 , startY:hh*0.7 , endX:ww , endY:hh*0.2, angle:55, time:10},
	  	{startX:ww*0.3 , startY:-fishH , endX:ww*0.4 , endY:hh, angle:160, time:10},
	  	{startX:ww , startY:hh , endX:-fishW , endY:0, angle:-45, time:10}
	  ];
	  window.setTimeout(function(){
		  
		  
	      var m=1;
	      resetFish(m , n , 0);

	      
		  }, 3300);
	

	  function setCss3 (obj,attrObj) {
		   for (var i in attrObj) {
		     var newi=i;
			 if(newi.indexOf("-")>0){
			   var num=newi.indexOf("-");
			   newi=newi.replace(newi.substr(num,2),newi.substr(num+1,1).toUpperCase());
			 }
			 obj.style[newi]=attrObj[i];
			 newi=newi.replace(newi.charAt(0),newi.charAt(0).toUpperCase());
			 obj.style["webkit"+newi]=attrObj[i];
			 obj.style["moz"+newi]=attrObj[i];
			 obj.style["o"+newi]=attrObj[i];
			 obj.style["ms"+newi]=attrObj[i];
		   }
	 }	 

	 
	  
	  function resetFish(eqm , eqn , td){
		  $(".fishRun").eq(eqm).css({"top":pos[eqn].startY+"px","left":pos[eqn].startX+"px"})
		  setCss3($(".fishRun").eq(eqm)[0] , {"transform":"scale("+_rate+","+_rate+") rotate("+pos[eqn].angle+"deg)" , "display":"block"})
		  TweenMax.to($(".fishRun").eq(eqm)[0],pos[eqn].time,{left:pos[eqn].endX,top:pos[eqn].endY,repeat:0,delay:td,onComplete:function(){
		  
		  	var o =document.getElementById(this.target.id);
		  	var n2=parseInt(Math.random()*20);
		  	var m2 = o.getAttribute("num");
		  
		  	//resetFish(m2 , n2 , 0)
		  }})
	  }
	  function onceFish(eqm , eqn , td){
		  $(".fishRun").eq(eqm).css({"top":pos[eqn].startY+"px","left":pos[eqn].startX+"px"})
		  setCss3($(".fishRun").eq(eqm)[0] , {"transform":"scale("+_rate+","+_rate+") rotate("+pos[eqn].angle+"deg)" , "display":"block"})
		  TweenMax.to($(".fishRun").eq(eqm)[0],pos[eqn].time,{left:pos[eqn].endX,top:pos[eqn].endY,repeat:0,delay:td,onComplete:function(){ }})
	  }
	  var _uRd=0;
	  var timer=null;
	  var _countNum=11;
	  function countDown(){
		     _countNum--;
		    if(_countNum < 0){ 
			    $(".end-txt").html(_uRd);
		    	$(".end, .t-bg").fadeIn();
		    	clearInterval(timer)
		    	TweenMax.killAll();
			    return;} 
		    $(".time-sec").html(_countNum);
	        window.setTimeout(function(){countDown();}, 1000);
	  }
	  
	  function startfn(){
	  	var st = 0;
	  	timer = setInterval(function(){
	  		var m=st;
	  		var n= st;
	  		resetFish(m,n,0);
	  		st++;
	  		if(st>10){
	  			clearInterval(timer)
	  		}
	  	},500);
	  	window.setTimeout(function(){countDown();}, 500);
	  }
 
	 var _newId=11;
	 var resetTimer =setInterval(function(){
		 if(_newId > 15){_newId++;}
	     if(_newId > 16){_newId=11;}
	  },3000);	   
	  
	 
     $(".fishRun").click(function(){
         var _id=$(this).attr("num");
         $(this).fadeOut();
         _uRd++;
         _cm3.play();
         console.log(_uRd);
         if(_newId > 15){return;}
         onceFish(_newId , _newId , 0);
         _newId++;
     });


     $('.p1-b1').click(function(){

    	 $.post("./api/?c=cha", {id:1}, function(data){
        	 if('end' == data.s){
        		 $(".tang, .zhuli, .t-bg").fadeIn();
             }else{
            	 $(".tang, .g1, .t-bg").fadeIn();
             } 
    	 }, "json");
        
     });
     
     $('.p1-hdgz').click(function(){
        $(".t-bg, .rule").fadeIn();
     });
     $('.p1-jpzc').click(function(){
        $(".t-bg, .jpin").fadeIn();
     });
     $('.rule-close').click(function(){
        $(".t-bg, .rule").fadeOut();
     });
     $('.jpin-close').click(function(){
         $(".t-bg, .jpin").fadeOut();
      });

  
     
     $('.zhuli-close').click(function(){
         $(".zhuli, .t-bg, .tang").fadeOut();
         $(".p1").show();
     });
     var _shareShu=1;
     $('.zhuli-qing').click(function(){
    	 _shareShu=2;
         $(".zhuli").fadeOut();
         $(".share").fadeIn();
     });
     $(".share").click(function(){
         $(".share").fadeOut();
         if(2 == _shareShu){
        	 _shareShu=1;
        	 $(".zhuli").fadeIn();
         }else{
        	 $(".t-bg").fadeOut();
         }
     });

     

    
     var _thecardId='';
     var _thecode='';
     var _thetimestamp='';
     var _thesignature='';
     $('.usj-open').click(function(){
    	 if(1 == _jId){
    		 $(".usj").fadeOut(); 
    		 $(".utian").fadeIn();
         }else{
        	 $(".usj, .t-bg, .tang").fadeOut(); 
             $(".upost").fadeIn();
        	 wx.addCard({
       	      cardList: [
       	        {
       	          cardId: _thecardId,
       	          cardExt: '{"code": "'+_thecode+'", "openid": "<?php echo $openid; ?>", "timestamp": "'+_thetimestamp+'", "signature":"'+_thesignature+'"}'
       	        }
       	      ],
       	      success: function (res) {
       	        //alert('success：' + JSON.stringify(res.cardList));
       	        $.post("./api/?c=code", {thecode:_thecode,code:res.cardList[0].code,cid:_thecardId}, function(data){}, "json");
           	     
       	      },
       	      cancel: function (res) {
       	        //alert(JSON.stringify(res))
       	      }
       	    });
             
        	 
         }
     });
     $('.end-cha').click(function(){
    	 $.post("./api/?c=open", {urd:_uRd}, function(data){
    		 _jId=data.j;
    		 _thecardId=data.c.cid;;
    	     _thecode=data.c.code;
    	     _thetimestamp=data.c.timestamp;
    	     _thesignature=data.c.signature;
    		 $(".usj-tu").attr("src", "./img/j/"+data.n+'.png');
    		 $(".upost-d").attr("src", "./img/j/"+data.n+'-post-bg.jpg');
    		 $(".upost-t2").attr("src", "./img/j/"+data.n+'-t2.png');
    		 $(".upost-save").attr("src", "./img/j/"+data.n+'-post.jpg');
        	 $(".end").fadeOut(); 
        	 $(".usj").fadeIn();
    	 }, "json");
     });
     $('.u-tj').click(function(){
         var _name=$("#u-name").val();
         var _lx=$("#u-lx").val();
         var _sf=$("#u-sf").val();
        if('' == _name){$(".weui-msg").html("请输入姓名");$(".js_dialog").show();return;}
 		if('' == _lx){$(".weui-msg").html("请输入联系方式");$(".js_dialog").show();return;}
 		if(10 > _sf.length){$(".weui-msg").html("请输入有效身份证");$(".js_dialog").show();return;}
 		if('' == _sf){$(".weui-msg").html("请输入身份证");$(".js_dialog").show();return;}
    	 $.post("./api/?c=uinfo", {name:_name,lx:_lx,sf:_sf}, function(data){
    		 $(".usj, .t-bg, .tang, .utian").fadeOut();
    		 $(".upost").fadeIn(); 
    		 
        	 }, "json");
     });

     $(".js_dialog").click(function(){
         $(".js_dialog").hide();
 	 }); 	

   
	wx.config({
        appId: '<?php echo $signPackage["appId"];?>',timestamp: <?php echo $signPackage["timestamp"];?>,
        nonceStr: '<?php echo $signPackage["nonceStr"];?>',signature: '<?php echo $signPackage["signature"];?>',
        jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'showMenuItems', 'hideMenuItems','addCard','chooseCard','openCard']
    });
    wx.ready(function () {
    		var _title='年年有鱼 鼠你有福';
    		var _desc='新春捉吉鲤  全民赢金鼠';
    		var _link='http://mei94.com/dnsj/';
    		var _imgUrl='http://mei94.com/dnsj/img/64.png';
    			wx.onMenuShareTimeline({title: _desc, link: _link, imgUrl: _imgUrl,success: function () {
    				$.post("api/?c=share", {id:1}, function(data){}, "json");
    			},cancel: function () { 
    			}});
    			wx.onMenuShareAppMessage({ title: _title, desc: _desc,link: _link,imgUrl: _imgUrl, type: '', dataUrl: '', success: function () {
    				$.post("api/?c=share", {id:1}, function(data){}, "json");
    			},cancel: function () { 
    			}});
    });

    _mbg.play();
    document.addEventListener("WeixinJSBridgeReady", function () {
    	_mbg.play();
    }, false);
     
});
</script></body></html>